package com.rockcent.service;

import com.rockcent.common.domain.enumclass.Whether;
import com.rockcent.mall.lib.domain.MerchantCoupon;
import com.rockcent.mall.lib.domain.enumclass.MerchantCouponStatus;
import com.rockcent.mall.lib.dto.IntegrationCouponRespDto;

import java.math.BigDecimal;
import java.util.List;

/**
 * Created by zhangjh on 2016/11/29.
 */
public interface MerchantCouponSrv {
    /**
     * @return
     */
    List<Long> findAllExpiredCouponIds();

    /**
     * @param ids
     * @param status
     */
    void updateCoupoStatus(List<Long> ids, MerchantCouponStatus status);

    /**
     * @param couponId
     * @param status
     */
    void updateCoupoStatus(Long couponId, MerchantCouponStatus status);

    /**
     * @param mallId
     * @param channelId
     * @return
     */
    BigDecimal queryAvailableAmountByMallId(Long mallId, Long channelId);

    /**
     * @param yes
     * @param integrationChannelId
     * @param status
     * @return
     */
    List<IntegrationCouponRespDto> findByIntegrationAndIntegrationChannelIdAndStatus(Whether yes, Long integrationChannelId, MerchantCouponStatus status);

    /**
     *
     * @param yes
     * @param integrationChannelId
     * @param issued
     * @param faceVal
     * @return
     */
    IntegrationCouponRespDto findTop1ByIntegrationAndIntegrationChannelIdAndStatusAndFaceVal(Whether yes, Long integrationChannelId, MerchantCouponStatus issued, BigDecimal faceVal);

    /**
     *
     * @return
     */
    List<Long> findAllReceiveOutCouponIds();

}
